/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package page;

import dbase.DBconnection;
import dbase.DBregister;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 *
 * @author aa
 */
public class goRegistrasi {
    public goRegistrasi(HttpServletRequest request){
        String nrp = request.getParameter("nrp");
        String nama = request.getParameter("nama");
        String alamat = request.getParameter("alamat");
        String status = request.getParameter("status");
        HttpSession session = request.getSession();
        DBconnection dbConn = new DBconnection();
        DBregister dbRegister = new DBregister(dbConn.getConnection());
        try{
                dbRegister.insertRegister(nrp,nama,alamat, status);
        }catch(Exception ex){
            ex.printStackTrace();
        }finally{
            dbConn.closeConnection();
        }
    }

}
